//
//  Definitions.h
//  iSeal5200
//
//  Created by heyuan on 12-12-4.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#define WEBSERVICE_URL @"http://ai.ishowtu.com/api/api.mingfa.php"

#define REQ_JSON_KEY  @"vars"

#define WEBSERVICE_TIMEOUT 10

#define HYLocalizedString(string) NSLocalizedString(string, nil)

#ifdef DEBUG_MODE
#define HYLog(s, ... )   NSLog(@"<%p %@ %s:(%d)>%@",self,[[NSString stringWithUTF8String:__FILE__] lastPathComponent],__FUNCTION__,__LINE__,[NSString stringWithFormat:(s),##__VA_ARGS__])
#else
#define HYLog( s, ... )
#endif

#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)

#define HYSafeRelease(__v) ([__v release], __v = nil);

#define HYSuperDealoc [super dealloc];

#define FONT_SMALL [UIFont systemFontOfSize:12.0]

#define FONT_SMALL_BOLD [UIFont boldSystemFontOfSize:12.0]

#define FONT_NORMAL [UIFont systemFontOfSize:14.0]

#define FONT_NORMAL_BOLD [UIFont boldSystemFontOfSize:14.0]

#define FONT_MIDDLE [UIFont systemFontOfSize:16.0]

#define FONT_MIDDLE_BOLD [UIFont boldSystemFontOfSize:16.0]

#define FONT_TITLE [UIFont boldSystemFontOfSize:20.0]

#define kThemeRed       @"red"
#define kThemeGray      @"gray"

extern NSString * const ThemeDidChangeNotification;

extern NSString * const User_AccountName;

extern NSString * const User_AccountInfo;

extern NSString * const User_AccountPassword;

extern NSString * const User_AccountID;

#define HELP_URL @"http://www.railton.com.cn/FAQ.html"

#define FEEDBACK_MAX_WORDS 150

#define MAX_INPUT_WORDS 200

#define kCELL_TXT_WIDTH 210
#define kCELL_IMAGE_HEIGHT 260

#define CELL_TXTLBL_HEIGHT(str) [str sizeWithFont:FONT_NORMAL constrainedToSize:CGSizeMake(kCELL_TXT_WIDTH, MAXFLOAT) lineBreakMode:UILineBreakModeWordWrap].height

#define LOADMOREIMAGES @"LoadMoreImages"

typedef enum {
    ProShowerTypeLastest = 0,
    ProShowerTypeHotest,
    ProShowerTypePopular
}ProShowerSortType;

static inline double radians (double degrees) {return degrees * M_PI/180;}

